package com.software.graduationproject.modules.user.object;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.software.graduationproject.modules.comment.object.CommentVo;
import com.software.graduationproject.modules.user.entity.User;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * UserVo : 系统用户表
 * ---------------------------------------------------------------------------------------------------------------------
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class UserVo extends User {

    @ApiModelProperty(value = "token码")
    private String token;

    private CommentVo commentVo;

    private String foodName;

    @JsonFormat(pattern = DatePattern.NORM_DATE_PATTERN, timezone = "GMT+8")
    @DateTimeFormat(pattern = DatePattern.NORM_DATE_PATTERN)
    private Date time;
}
